package com.cjm.one.goods.service;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.cjm.one.model.goods.dto.StockDeductionDTO;
import com.cjm.one.model.goods.dto.StockRevertDTO;
import com.cjm.one.model.goods.entity.GoodsBrowseHistory;
import com.cjm.one.model.goods.entity.GoodsInfo;
import com.cjm.one.model.goods.entity.GoodsSku;
import com.cjm.one.model.goods.enums.SortStrategyEnum;
import com.cjm.one.model.goods.vo.GoodsSkuVo;

import java.util.List;

/**
* @author 29289
* @description 针对表【goods_sku】的数据库操作Service
* @createDate 2024-09-05 16:07:00
*/
public interface GoodsSkuService extends IService<GoodsSku> {

    Page<GoodsSku> pageList(Long current, Long size, Long categoryId, String name, SortStrategyEnum strategyEnum);

    Page<GoodsSku> pageListByCategoryId(Long categoryId, Long current, Long size);

    Page<GoodsSkuVo> pageListByCollection(Long id, Long current, Long size);

    Page<GoodsSku> getByUserBrowseHistory(Integer current, Integer size, Long id);


    Page<GoodsSku> getSkuCouponList(Long[] ids);

    Boolean deductionStock(List<StockDeductionDTO> deductionList);
    Boolean revertStock(List<StockRevertDTO> stockRevertDTOS);
}
